<?php

require_once('../include/GeneralTop.php');
require('../include/class/db.php');
require('../include/class/pagination.php');
require('../include/simpleHeader.php');

/*
if (!isset($_SESSION['Index_Username'])) {
	die('<div style="text-align:center">'.MSG_PERMISSION_DENIED.'</div>');
}
*/

$id  = "-1";
if (isset($_GET['Id'])) {
  $id  = $_GET['Id'];
}

$db = new db;
$sql = sprintf("SELECT * FROM petopus WHERE Id = %s", GetSQLValueString($id, "int"));
$res = $db->query($sql);
$row = $db->fetch($res);

if(OPUS_BOOK == $row['petopus_class']) {
	$name = TEXT_BOOK_NAME;
	$author = TEXT_BOOK_AUTHOR;
}
else if(OPUS_FILM == $row['petopus_class']) {
	$name = TEXT_FILM_NAME;
	$author = TEXT_FILM_AUTHOR;
}
else {
	$name = TEXT_CAMPUS_NAME;
	$author = TEXT_BOOK_AUTHOR;
}

?>

<body topmargin="0" leftmargin="0">
<table width="777" border="0" align="left" cellpadding="0" cellspacing="0" valign="top">
  <tr>
    <td width="777" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="51" valign="top" background="../images/fen_09.gif"><table width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="16">&nbsp;</td>
            </tr>
          </table>
          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="14"><img src="../images/fen_12.gif" width="7" height="29"></td>
              <td width="405"><span class="font_16px_black_B"><?php echo $row['petopus_name']; ?></span></td>
              <td width="15">&nbsp;</td>
              <td width="299" align="right" class="font_12px_gray"><a href="javascript:history.go(-1);" class="gray_12px">[<?php echo TEXT_BACK?>]</a></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="1" bgcolor="#767676"></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" class="font_12px_gray" style="margin-bottom:10px;">
  <tr>
    <td width="120" align="left"><img src="<?php echo IMAGES_OPUS_FOLDER.$row['petopus_pic']; ?>" border="0" class="img_border"></td>
  	<td width="800" height="30" align="left" valign="top">
  	  <table border="0" align="left" cellpadding="5" cellspacing="0" class="font_12px_gray">
  	    <tr>
  	      <td><strong><?php echo $name?>：</strong></td>
    	  <td align="left"><?php echo $row['petopus_name']; ?></td>
    	</tr>
    	<tr>
    	  <td><strong><?php echo TEXT_BOOK_CLASS?>：</strong></td>
    	  <td align="left"><?php echo getOpusType($row['petopus_class']); ?></td>
    	</tr>
    	<tr>
    	  <td><strong><?php echo $author?>：</strong></td>
		  <td align="left"><?php echo $row['petopus_author']; ?></td>
		</tr>
      </table>
    </td>
  </tr>
  <tr>
   <td colspan="2"><strong><?php echo TEXT_BOOK_INFO?>：</strong></td>
  </tr>
  <tr>
   <td colspan="2"><?php echo nl2br($row['petopus_info']); ?></td>
  </tr>
  
  
  
<tr>
	          <td><input type="button" id="button" onclick="javascript:history.go(-1);" value="<?php echo TEXT_BACK?>"></td>
	        </tr>
          </table>
          <p>&nbsp;</p></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>